from selenium import webdriver
from time import sleep

from selenium.webdriver.common import by
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()


url = "http://novel.hctestedu.com/"

driver.get(url)

sleep(2)

# driver.find_element(By.XPATH,'//*[@id="headerUserInfo"]/span/a[2]').is_displayed()

# driver.find_element_by_class_name("mr15").click()

driver.find_element(By.CLASS_NAME,"mr15").click()

sleep(2)

driver.find_element(By.ID,"txtUName").send_keys("13851752377")

driver.find_element(By.ID,"txtPassword").send_keys("11081103a")

driver.find_element(By.ID,"btnLogin").click()

sleep(2)
print(driver.title)


assert  "读书屋_原创小说网站" == driver.title



driver.quit()


